import { axios } from '../../utils/request'



const api = {
    getSystemReportProgramme: "/erp/reportProgramme/getSystemReportProgramme",
    list: '/erp/reportProgramme/list',
    listUnFinishProcedureDetailDispatchVo: '/production/dispatch/listUnFinishProcedureDetailDispatchVo',  //废弃 20220101
    getUnFinishProductionWorkVo: '/production/dispatch/getUnFinishProductionWorkVo',
    createCardDetail: "/erp/workProcedureCardDetail/createCardDetail",
    batchSaveCardDetail: '/erp/workProcedureCardDetail/batchSaveCardDetail',
    batchDelete: "/erp/workProcedureCardDetail/batchDelete",
    batchExamine: "/erp/workProcedureCardDetail/batchExamine",
    listByIds: "/erp/workProcedureCardDetail/listByIds",
}

// 查询系统报表方案
export function getSystemReportProgramme (data) {
    return axios({
        url: api.getSystemReportProgramme,
        method: "get",
        params: data
    })
}

// list
export function getList (data) {
    return axios({
        url: api.list,
        method: "get",
        params: data
    })
}

// 获取未完成的加工单明细
export function getUnFinishProductionWorkVo (data) {
    return axios({
        url: api.getUnFinishProductionWorkVo,
        method: "post",
        data: data
    })
}

// 获取未完成胡派工单任务  废弃 20220101
export function listUnFinishProcedureDetailDispatchVo (data) {
    return axios({
        url: api.listUnFinishProcedureDetailDispatchVo,
        method: "post",
        data: data
    })
}

// 保存新增记录
export function createCardDetail (data) {
    return axios({
        url: api.createCardDetail,
        method: "post",
        data: data
    })
}

// 批量保存
export function batchSaveCardDetail (data) {
    return axios({
        url: api.batchSaveCardDetail,
        method: "post",
        data: data
    })
}

// 批量删除
export function batchDelete (data) {
    return axios({
        url: api.batchDelete,
        method: "post",
        data: data
    })
}

// 批量审核
export function batchExamine (data) {
    return axios({
        url: api.batchExamine,
        method: "post",
        data: data
    })
}

// 批量获取汇报编号
export function listByIds (data) {
    return axios({
        url: api.listByIds,
        method: "post",
        data: data
    })
}









//======================================改版后接口========================
export function saveReport (data) {
    return axios({
        url: '/erp/workProcedureCardMain/save',
        method: "post",
        data: data
    })
}

export function submitOrder (data) {
    return axios({
        url: '/erp/workProcedureCardMain/submit',
        method: "get",
        params: data
    })
}

export function getCodeReport (data) {
    return axios({
        url: '/erp/workProcedureCardMain/getCode',
        method: "get",
        params: data
    })
}

export function exameReport (data) {
    return axios({
        url: '/erp/workProcedureCardMain/examine',
        method: "get",
        params: data
    })
}

export function deleteReport (data) {
    return axios({
        url: '/erp/workProcedureCardMain/delete',
        method: "DELETE",
        params: data
    })
}































